<!DOCTYPE html>
<html>
<head>
    <title>新闻鉴别助手</title>
    <meta charset="UTF-8">
    <style>
        body {
            width: 200px;
            height: 250px;
            text-align: center;
            justify-content: center;
        }
        #identify {
            font-size: 18px;
            font-weight: bold;
            padding: 8px 100px 8px 20px;
            margin-bottom: 10px;
            background: transparent;
            border: 0;
            cursor: pointer;
            position: relative;
            top: 5px;
            white-space: nowrap; /* 添加这行代码 */
        }
        #identify:hover {
            cursor: hand;
            color: #982020;
        }
        #history {
            font-size: 18px;
            font-weight: bold;
            padding: 0px 40px 8px 13px;
            margin-bottom: 10px;
            background: transparent;
            border: 0;
            cursor: pointer;
        }
        #history:hover {
            cursor: hand;
        }
        h1 {
            color: #982020;
            position: relative;
        }
        h1::after {
            content: "";
            position: absolute;
            bottom: -5px;
            left: 18px;
            width: 80%;
            height: 2px;
            background-color: #982020;
        }
        /* 隐藏默认的复选框 */
       .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        /* 创建开关的样式 */
       .switch {
            position: relative;
            display: inline-block;
            width: 36px;  /* 调整宽度 */
            height: 20px; /* 调整高度 */
            top: 3px; /* 整体下移2px */
        }

        /* 创建滑动按钮的样式 */
       .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            -webkit-transition:.4s;
            transition:.4s;
            border-radius: 20px; /* 调整圆角 */
        }

       .slider:before {
            position: absolute;
            content: "";
            height: 16px; /* 调整高度 */
            width: 16px; /* 调整宽度 */
            left: 2px; /* 调整左边距 */
            bottom: 2px; /* 调整底部边距，保持内部圆形的位置 */
            background-color: white;
            -webkit-transition:.4s;
            transition:.4s;
            border-radius: 50%;
        }

        /* 当复选框被选中时，改变滑动按钮的样式 */
        input:checked +.slider {
            background-color: #982020;
        }

        input:checked +.slider:before {
            -webkit-transform: translateX(14px); /* 调整移动距离 */
            -ms-transform: translateX(14px); /* 调整移动距离 */
            transform: translateX(14px); /* 调整移动距离 */
        }

        /* 圆角的滑动按钮 */
       .slider.round {
            border-radius: 20px; /* 调整圆角 */
        }
       .row{
           margin-top: 30px;
            display: flex;
            flex-direction: row;
            text-align: center;
            justify-content: center;
        }

    </style>
</head>
<body>
<h1>新闻鉴别助手</h1>
<div class="row">
    <label style="font-size: 18px;font-weight: bold;margin-right: 10px">悬浮球</label>
    <label class="switch">
        <input type="checkbox" id="toggleBall" checked>
        <span class="slider round"></span>
    </label>
</div>
<br>
<button id="identify" style="margin-bottom: 60px">鉴别有误？点我试试</button>
<br>
<span style="font-size: 12px;color: darkgray">该项目基于 PerfXCloud 开发</span>
<script src="popup.js"></script>
</body>
</html>